import { createRouter, createWebHashHistory } from "vue-router"
// vite-plugin-pages生成的路由信息，正常使用即可
import routes from "virtual:generated-pages"
import NProgress from 'nprogress'
import 'nprogress/nprogress.css'

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

router.beforeEach(async (_to, _from) => {
  NProgress.start();
});

router.afterEach((_to) => {
  NProgress.done();
});

export default router
